A 15 bit LFSR, a pseudo random number generator, here it is being used to output quick-silver 1/4 of the time. Every 6 quicksilver is put into a lead, if all 6 1/4 chances happen, the quicksilver is output. 

A truly random output would be impossible, but this is close enough. It should have a loop period of 2^15 - 1, 32767 to get back to the initial seed input, with a period of 20, this should loop after 655340 cycles.